package com.ers.service;

import java.util.List;

import com.ers.dao.HrDao;
import com.ers.model.HR;
import com.ers.model.Record;

public class HrService {
	private HrDao hrDao;
	public HrDao getHrDao() {
		return hrDao;
	}
	public void setHrDao(HrDao hrDao) {
		this.hrDao = hrDao;
	}
	public List<HR> searchByLoginName(String loginName, String password) {
		return hrDao.searchByLoginName(loginName,password);
	}
	public void add(HR hr) {
		hrDao.save(hr);	
	}
	public void collectResume(int id,int companyId) {
		hrDao.updateResumeRecord(id,companyId);
	}
	
	public void deleteRecord(int id) {
		hrDao.deleteRecord(id);
	}
	public void updateRecord(Record record) {
		hrDao.updateRecord(record);	
	}
	public Record loadRecordById(int id) {
		return hrDao.loadRecordById(id);
	}
	public void resetPwd(String mailbox) {
		hrDao.updatePwd(mailbox);
	}
		
}
